package com.example.test0.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.test0.model.Goods;
import com.example.test0.model.User;
import com.example.test0.model.UserLike;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GoodsMapper extends BaseMapper<User> {
    @Select("select * from `goods`")
    public List<Goods> findAllGoods();

    @Select("select * from `inturn`")
    public List<UserLike> findAllInturn();

    @Select("select * from `inturn` where `goodsid`=#{goodsid}")
    public List<UserLike> findInturnByGoodsid(String goodsid);

    @Select("select * from `inturn` where `userid`=#{userid}")
    public List<UserLike> findInturnByUserid(String userid);
}
